using System;
using Company.Model;
using Company.Model.Services;
using Company.Services;
using Company.Web.Infrastructure;

namespace Company.Web.Model
{
    public class HomeViewTask : IHomeViewTask
    {
        IHomeView m_HomeView = new HomeView();
        IPersonaService m_PersonaService = new PersonaService();
        ISessionService m_SessionService = new SessionService();

        public IHomeView GetDefaultView()
        {
            ISessionData Data = m_SessionService.GetCurrentSessionData();
            m_HomeView.Persona = m_PersonaService.GetPersona(Convert.ToInt32(Data.IDPersona)) ?? new PersonaModel();
            return m_HomeView;
        }
    }
}